{include file="head" /}
<script src="/static/index/js/lk/user.js"></script>

<style>
    .ws-select {
        width: 100%;
        border: none;
        color: #fff;
        font-size: 14px;
        appearance: none;
        -moz-appearance: none;
        -webkit-appearance: none;
        background: url(../../static/public/images/identi_icon_pulldown@2x.png) no-repeat right center;
        background-size: auto;
        outline: medium;
        padding-right: 18px;
        background-size: 13px 8px;
    }
</style>
<body ng-app="starter" ng-controller="AppCtrl" class="grade-a platform-browser platform-win32 platform-ready">

<ion-header-bar class="order-modal-header bar bar-header">
    <h1 class="title">注册中心</h1>
    <div class="close" onclick="history.go(-1)">
        <i class="icon ion-ios-arrow-left"></i>
    </div>
</ion-header-bar>

<ion-nav-bar class="bar-stable headerbar nav-bar-container hide" nav-bar-transition="ios" nav-bar-direction="none" nav-swipe="">
    <div class="nav-bar-block" nav-bar="cached"><ion-header-bar class="bar-stable headerbar bar bar-header" align-title="center"><div class="title title-center header-item"></div></ion-header-bar></div><div class="nav-bar-block" nav-bar="active"><ion-header-bar class="bar-stable headerbar bar bar-header" align-title="center"><div class="title title-center header-item"></div></ion-header-bar></div></ion-nav-bar>
<ion-nav-view class="view-container" nav-view-transition="ios" nav-view-direction="none" nav-swipe=""><ion-view hide-nav-bar="true" class="signin-view pane" state="signin" nav-view="active" style="opacity: 1; transform: translate3d(0%, 0px, 0px);">

    <form method="post" id="formid">
        <div class="sign_up">
            <div class="sign_up_content">

                <ul class="sign_up_list">
                    <li class="newinput" ng-show="show_signup_code">
                  <span class="input-text">
                       姓名 :
                  </span>
                        <input type="text" placeholder=" 姓名" name="nickname" class="nickname ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" style="">
                    </li>
                    <!--
                       <li class="newinput" ng-show="show_signup_code">
                           <span class="input-text">
                               手机号码 :
                           </span>
                           <input type="text" placeholder="手机号码" name="username" class="username ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" style="">
                       </li>
                       <li class="newinput input_iphone_code">
                           <span class="input-text">
                               验证码:
                           </span>
                           <input type="text" placeholder="短信验证码" name="phonecode" class="phonecode ng-pristine ng-valid ng-empty ng-touched" style="">
                           <span class="code_btn ng-binding"  onclick ="return get_svg();">
                               获取验证码
                           </span>
                       </li>
                     -->

                    <li class="newinput" ng-show="show_signup_code">
                  <span class="input-text">
                      电子邮箱:
                  </span>
                        <input type="text" placeholder="请输入电子邮箱" name="email" class="email ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" style="">
                    </li>

                    <!--

                     <li class="newinput" ng-show="show_signup_code">
                         <span class="input-text">
                             手机号码:
                         </span>
                         <input type="text" placeholder="请输入手机号" name="utel" class="username ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" style="">
                     </li>

                     <li class="newinput input_iphone_code">
                         <span class="input-text">
                             验证码:
                         </span>
                         <input type="text" placeholder="短信验证码" name="phonecode" class="phonecode ng-pristine ng-valid ng-empty ng-touched" style="">
                         <span class="code_btn ng-binding"  onclick ="return get_svg();">
                             获取验证码                  </span>
                     </li>
       -->
                    <li class="newinput input_iphone_code">
                  <span class="input-text">
                      验证码:
                  </span>
                        <input type="text" placeholder="验证码" name="emailcode" class="phonecode ng-pristine ng-valid ng-empty ng-touched" style="">
                        <span class="code_btn ng-binding"  onclick ="return get_smg();">
                      获取验证码                  </span>
                    </li>
                    <li class="newinput" ng-show="show_signup_code">
                  <span class="input-text">
                      用户名:
                  </span>
                        <input type="text" placeholder="请输入用户名" name="username" class="ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" style="">
                    </li>
                    <li class="newinput">
                  <span class="input-text">
                     密码:
                  </span>
                        <input type="password" placeholder="密码" name="upwd" required="" class="ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" style="">
                    </li>
                    <li class="newinput">
                  <span class="input-text">
                     确认密码:
                  </span>
                        <input type="password" placeholder="确认密码" name="upwd2" required="" class="ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" style="">
                    </li>
                    <li class="newinput">
                  <span class="input-text">
                    推荐码:
                  </span>
                        <input class="sign_code ng-pristine ng-untouched ng-valid ng-empty"  placeholder="推荐码" name="oid" style="">
                    </li>

                </ul>
                <input type="hidden" value="zh-cn" id="language">
                <button class="newbutton sign_up_btn" onclick="return checkform(this.form);" >
                    注册登陆          </button>

            </div>
    </form>
    <div class="signin-footer">
        <a href="/index/login/login.html">已有账户？直接登录</a>
    </div>
    </div>
    <div class="spinner-view hide">
        <div class="spinner">
            <div class="double-bounce1"></div>
            <div class="double-bounce2"></div>
        </div>
        <div class="message ng-binding" ng-class="{ 'fadein' : message }"></div>
    </div>
</ion-view></ion-nav-view>


<div class="backdrop"></div><div class="ionic_toast"><div class="toast_section" ng-class="ionicToast.toastClass" ng-style="ionicToast.toastStyle" ng-click="hideToast()" style="display: none; opacity: 0;"><span class="ionic_toast_close"><i class="ion-android-close toast_close_icon"></i></span><span ng-bind-html="ionicToast.toastMessage" class="ng-binding"></span></div></div>
<input type="hidden" value="请正确输入邮箱!" id="reg_16">
<input type="hidden" value="再发一次" id="reg_17">
<input type="hidden" value="请正确输入手机号!" id="reg_18">
</body></html>
<script>

    $('#about').on('click', function(){


//页面一打开就执行，放入ready是为了layer所需配件（css、扩展模块）加载完毕
        layer.open({
            type: 1
            ,title:  ['用户协议', 'font-size:18px; text-align: center;'] //不显示标题栏
            ,closeBtn: false
            ,area: '90%;'
            ,shade: 0.8
            ,id: 'LAY_layuipro' //设定一个id，防止重复弹出
            ,resize: false
            ,btn: ['同意并注册', '残忍拒绝']
            ,btnAlign: 'c'
            ,moveType: 1 //拖拽模式，0或者1
            ,content: '<div style="padding: 20px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 90%;">万豪国际</div>'
            ,success: function(layero){
                var btn = layero.find('.layui-layer-btn');
                btn.find('.layui-layer-btn1').attr({
                    href: 'http://p1.lfwww.cn/'
                    ,target: '_blank'
                });
            }
        });

//关于
        /*$('#about').on('click', function(){
          layer.alert(layer.v + ' - 贤心出品 sentsin.com');
        });*/

    });

    function checkform(form){
        var username = form.username.value;
        var upwd = form.upwd.value;
        var upwd2 = form.upwd2.value;
        var oid = form.oid.value;
        if(!username){
            layer.msg("请输入用户名");
            return false;
        }

        if (!upwd) {
            layer.msg("请输入登录密码");
            return false;
        }

        if (!upwd2) {
            layer.msg("请再次输入登录密码");
            return false;
        }

        if(upwd.length < 6 || upwd2.length < 6){
            layer.msg("密码长度大于6位");
            return false;
        }

        if(upwd != upwd2){
            layer.msg("两次输入密码不同");
            return false;
        }

        if(!oid){
            layer.msg("请输入邀请码");
            return false;
        }


        var data = $('#formid').serialize();
        var formurl = "/index/login/register.html";
        var locurl = "/index/index/index.html";

        WPpost(formurl,data,locurl);
        return false;
    }
</script>